package entityDAOs;

import java.sql.Time;
import java.util.Date;
import java.util.List;
import java.util.Set;
import org.hibernate.LockMode;
import org.hibernate.Query;
import static org.hibernate.criterion.Example.create;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import entities.Tutorial;

/**
 * A data access object (DAO) providing persistence and search support for
 * Tutorial entities. Transaction control of the save(), update() and delete()
 * operations can directly support Spring container-managed transactions or they
 * can be augmented to handle user-managed Spring transactions. Each of these
 * methods provides additional information for how to configure it for the
 * desired type of transaction control.
 * 
 * @see entities.Tutorial
 * @author MyEclipse Persistence Tools
 */

public class TutorialDAO extends BaseHibernateDAO<Tutorial,java.lang.Integer> {
	private static final Logger log = LoggerFactory
			.getLogger(TutorialDAO.class);
	// property constants
	public static final String LEVEL = "level";
	public static final String VALIDATION_FLAG = "validationFlag";
	public static final String TOTAL_POINTS = "totalPoints";
	public static final String MAGNITUDE = "magnitude";
	public static final String MATERIALS_INFO = "materialsInfo";
	public static final String NAME = "name";
	public static final String CONT_XML = "contXml";
	public static final String INTRODUCTION = "introduction";
	public static final String VIEWS = "views";

	public List<Tutorial> findByLevel(Object level) {
		return findByProperty(LEVEL, level);
	}

	public List<Tutorial> findByValidationFlag(Object validationFlag) {
		return findByProperty(VALIDATION_FLAG, validationFlag);
	}

	public List<Tutorial> findByTotalPoints(Object totalPoints) {
		return findByProperty(TOTAL_POINTS, totalPoints);
	}

	public List<Tutorial> findByMagnitude(Object magnitude) {
		return findByProperty(MAGNITUDE, magnitude);
	}

	public List<Tutorial> findByMaterialsInfo(Object materialsInfo) {
		return findByProperty(MATERIALS_INFO, materialsInfo);
	}

	public List<Tutorial> findByName(Object name) {
		return findByProperty(NAME, name);
	}

	public List<Tutorial> findByContXml(Object contXml) {
		return findByProperty(CONT_XML, contXml);
	}

	public List<Tutorial> findByIntroduction(Object introduction) {
		return findByProperty(INTRODUCTION, introduction);
	}

	public List<Tutorial> findByViews(Object views) {
		return findByProperty(VIEWS, views);
	}
}